package com.apply.config.utils;

import org.apache.commons.lang3.RandomUtils;

/**
 * @author tianp
 */
public class RandomUtil {
    public static String getRandom(int size, int startInclusive, int endExclusive) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < size; i++) {
            sb.append(RandomUtils.nextInt(startInclusive, endExclusive));
        }
        return sb.toString();
    }

    public static void main(String[] args) {
        System.out.println(getRandom(4, 0, 9));
    }
}
